package com.bright.cwduijie.duijie.pojo.bo;

import com.bright.cwduijie.duijie.pojo.dto.*;
import com.bright.cwduijie.duijie.pojo.po.*;
import com.bright.cwduijie.duijie.util.ListUtil;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * @Author hxj
 * @Date 2024/7/29 14:41
 * @Description 存放对接时获取的即将对接的数据
 */

@Data
public class ApiDataCollection {

    private AccSet accSet;
    private List<AccCodeDto> accCodes;

//    private List<VoucherDto> vouchers;
    private Map<String, List<VoucherEntryDto>> voucherEntryMap;
    // 新加的凭证 按月度报表的形式处理
    private Map<String, List<VoucherDto>> voucherMap;
    private Map<String, List<FixedAssetsDepreciationLog>> fixedAssetsDepreciationLogMap;
    private Map<String, List<FixedAssetsHandleLog>> fixedAssetsHandleLogMap;

    private Map<String, List<BalanceDto>> balanceMap;
    private Map<String, List<CreditPublishDto>> creditPublishMap;
    private Map<String, List<DebtPublishDto>> debtPublishMap;

    // 日记账等
    private List<DayBooks> dayBooks;
    private List<Contract> contracts;
    private List<FixedAssets> fixedAssets;
    // 固定资产4个记录
//    private List<FixedAssetsDepreciationLog> fixedAssetsDepreciationLogs;
//    private List<FixedAssetsHandleLog> fixedAssetsHandleLogs;
    private List<FixedAssetsInfoChange> fixedAssetsInfoChanges;
    private List<FixedAssetsValueChange> fixedAssetsValueChanges;
    // 月结
    private List<MonthlySettlementDto> monthlySettlements;

    // 自定义资产分类
    private List<CustomAssetCode> customAssetCodes;
    private List<AssistCode> assistCodes;
    private List<AssistCodeType> assistCodeTypes;

    private List<BioAssets> bioAssets;
    private List<InventoryAssets> inventoryAssets;
    private List<ImmaterialAssets> immaterialAssets;
    private List<CollectiveLand> collectiveLands;
    private List<DjFile> djFiles;

    // 冲洗凭证的DATA_KEY
    private List<String> flushVoucherDataKeys;

    /**
     * 是否一条数据都没有
     * 注意：accSet如果有查 无论要不要推都会赋值
     * @return
     */
    public boolean isEmpty() {
        return accSet == null && ListUtil.isEmpty(accCodes) && ListUtil.isEmpty(voucherEntryMap) && ListUtil.isEmpty(voucherMap) &&
                ListUtil.isEmpty(fixedAssetsDepreciationLogMap) && ListUtil.isEmpty(fixedAssetsHandleLogMap) &&
                ListUtil.isEmpty(balanceMap) && ListUtil.isEmpty(creditPublishMap) && ListUtil.isEmpty(debtPublishMap) && ListUtil.isEmpty(dayBooks) &&
                ListUtil.isEmpty(contracts) && ListUtil.isEmpty(fixedAssets) && ListUtil.isEmpty(fixedAssetsInfoChanges) && ListUtil.isEmpty(fixedAssetsValueChanges) &&
                ListUtil.isEmpty(monthlySettlements) && ListUtil.isEmpty(customAssetCodes) && ListUtil.isEmpty(assistCodes) && ListUtil.isEmpty(assistCodeTypes) &&
                ListUtil.isEmpty(bioAssets) && ListUtil.isEmpty(inventoryAssets) && ListUtil.isEmpty(immaterialAssets) && ListUtil.isEmpty(collectiveLands) &&
                ListUtil.isEmpty(djFiles) && ListUtil.isEmpty(flushVoucherDataKeys);
    }
}
